def gen(n):
    for i in range(n):
        # return 2*i
        yield  2*i

a=gen(6)

for i in a:
    print(i,end=" ")




# def gen(n):
#     for i in range(n):
#         yield  i*i

# x=gen(5)
# for i in x:
#     print(i)